import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
    state: {
        cs: 1,
        detailName: '',
        detailFlag: false,
        path:'',
        urlchange:'',
        workDetailid:'',
        Details:'',
        links:[],
        topLinks:[]
    },
    mutations: {
        cscs(state, num) {
            this.state.cs = num
        },
        setDetailName(state, name) {
            this.state.detailName = name
        },
        showDetail(state, flag) {
            this.state.detailFlag = flag
        },
        setPath(state, path) {
            this.state.path = path
        },
        setChange(state, num) {
            this.state.urlchange = num
        },
        workDetail(state, id) {
            this.state.workDetailid = id
        },
        setDetails(state ,list) {
            this.state.Details = list
        },
        linkList(stae,list) {
            this.state.links = list
        },
        topImgList(stae,list) {
            this.state.topLinks = list
        }
    },
    actions: {

    }
})